package com.ysd.servlet;

import java.io.IOException;
import java.util.ArrayList;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.ysd.dao.impl.AboutDao;
import com.ysd.entity.About;

/**
 * Servlet implementation class aboutServlet
 */
@WebServlet("/aboutServlet")
public class aboutServlet extends HttpServlet {
	AboutDao dao=new AboutDao();
	@Override
	protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		ArrayList<About> about=dao.getAllAbout();
		About a=dao.getAbout();
		req.setAttribute("ab", about);
		req.setAttribute("a", a);
		req.getRequestDispatcher("/about.jsp").forward(req, resp);
	}

}
